<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title> - 藏品</title>
		<meta name="keywords" content="">
		<meta name="description" content="">

		<link rel="shortcut icon" href="__PUBLIC__/admin/favicon.ico">
		<link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
		<link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

		<link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
		<link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
		<link rel="stylesheet" href="__PUBLIC__/admin/css/viewer.min.css">

	</head>

	<body class="gray-bg">
		<div class="wrapper wrapper-content animated fadeInRight">
			<div class="row">
				<div class="panel panel-default panel-first panel-list">
					<div class="panel-body">
						<div class="ay-header-action-bar" style="padding-left: 0px">
							<div class="pull-right">
							</div>
							<div class="clearfix"></div>
						</div>
						<form action="{:url('Collect/collection')}" method="get">
							<br>
							<!--<div class="form-inline">
								<input type="text" name="name" class="ay-search-width100 form-control" value="" placeholder="藏品名称">
								<input type="text" name="num" class="ay-search-width100 form-control" value="" placeholder="合同号">
								<input type="text" name="type" class="ay-search-width100 form-control" placeholder="类别" value="">
								<input type="text" name="material" class="ay-search-width100 form-control" placeholder="材质" value="">
								<p></p>
								<input type="text" name="author" class="ay-search-width100 form-control" placeholder="作者" value="">
								<input type="text" name="user" class="ay-search-width100 form-control" placeholder="委托单位" value="">
								<input type="text" name="cnum" class="ay-search-width100 form-control" placeholder="库区号" value="">
								<select name="state" class="ay-search-width100 form-control">
									<option value="">&#45;&#45;状态&#45;&#45;</option>
									<option value="0">在库</option>
									<option value="1">出库</option>
									<option value="2">转库</option>
								</select>
							</div>-->
							<br>
							<div class="form-inline">
								<button type="submit" class="btn btn-primary">搜索</button>
								<a href="{url('Collect/collection')}" class="btn btn-danger">清空</a>
							</div>
							<br>
						</form>
						<table class="table table-hover table-bordered table-list ay-table">
							<thead>
								<tr>
									<th width="2%"></th>
									<th style="text-align: center;width: 14%">缩略图</th>
									<th style="text-align: center;width: 8%">合同号</th>
									<th style="text-align: center;width: 14%">名称</th>
									<th style="text-align: center;width: 8%">类别</th>
									<th style="text-align: center;width: 18%">特征</th>
									<th style="text-align: center;width: 6%">作者</th>
									<th style="text-align: center;width: 12%">状态</th>
								</tr>
							</thead>
							<tbody>
								{foreach name="datac" item="v"}
								<tr>
									<td style="vertical-align: middle">1</td>
									<td class="ay-center" style="vertical-align: middle;text-align: center;">
										{volist name="v['image2']" id="vo" offset="0" length="1"}
											<img src="__PUBLIC__/uploads/{$vo}" data-original="__PUBLIC__/uploads/{$vo}" class="js-viewer-image" style="cursor: zoom-in;height:80px;width:80px;">
									    {/volist}
									</td>
									<td class="ay-center" style="vertical-align: middle">{$v.num}</td>
									<td style="vertical-align: middle">
										<p>{$v.name}</p>
									</td>
									<td class="ay-center" style="vertical-align: middle">{$v.type}</td>
									<td style="vertical-align: middle">
										<span style="font-size: 12px;color: grey;">材质：{$v.material}</span>
										<br>
										<span style="font-size: 12px;color: grey;">委托单位：{$v.user}</span>
										<br>
										<span style="font-size: 12px;color: grey;">首次入库时间：{$v.time}</span>
										<br>
										<span style="font-size: 12px;color: grey;">库区号：{$v.cnum}</span>
									</td>
									<td class="ay-center" style="vertical-align: middle">
										<p>{$v.author}</p>
									</td>
									<!--<td class="ay-center" style="vertical-align: middle">
										{if condition="($power['power']==1)||($power['power']==2)"}
										<a href="{:URL('collect/comment?id='.$v['id'])}">[添加]</a>
										{/if}
										<a href="{:URL('collect/liulan?id='.$v['id'])}">[浏览]</a>
									</td>-->
									<td class="ay-center" style="vertical-align: middle">
										{if condition="$v['state']==0 "}<span class="label label-danger">在库</span>
										{elseif condition="$v['state']==1"}<span class="label label-success">出库</span>
										{elseif condition="$v['state']==2"}<span class="label label-primary">转库</span> {/if}
										{if condition="$v['why']==''"}
										<p></p>
										{else}
										<p>【{$v['why']}】</p>
										{/if}
										<!--   <span class="label label-success">出库</span> -->
									</td>
									<!--<td class="ay-center" style="vertical-align: middle">
										{if condition="($power['power']==1)||($power['power']==2)"}
										<a href="{:URL('News/newschange?id='.$v['id'])}">[编辑]</a>
										{/if}
										<a href="{:URL('Collect/showInfo?id='.$v['id'])}" class="showInfo">[浏览]</a>
										{if condition="($power['power']==1)||($power['power']==2)"}
										<a href="{:URL('Collect/collection?id='.$v['id'])}">[删除]</a>
										{/if}
									</td>-->
								</tr>
								{/foreach}
							</tbody>
						</table>
						<div>
							<script type="text/javascript">
								function nextPage(page) {
									if(true && document.forms[0]) {
										var url = document.forms[0].getAttribute("action");
										if(url.indexOf('?') > -1) {
											url += "&currentPage=";
										} else {
											url += "?currentPage=";
										}
										url = url + page + "&showCount=10";
										document.forms[0].action = url;
										document.forms[0].submit();
									} else {
										var url = document.location + '';
										if(url.indexOf('?') > -1) {
											if(url.indexOf('currentPage') > -1) {
												var reg = /currentPage=\d*/g;
												url = url.replace(reg, 'currentPage=');
											} else {
												url += "&currentPage=";
											}
										} else {
											url += "?currentPage=";
										}
										url = url + page + "&showCount=10";
										document.location = url;
									}
								}

								function changeCount(value) {
									if(true && document.forms[0]) {
										var url = document.forms[0].getAttribute("action");
										if(url.indexOf('?') > -1) {
											url += "&currentPage=";
										} else {
											url += "?currentPage=";
										}
										url = url + "1&showCount=" + value;
										document.forms[0].action = url;
										document.forms[0].submit();
									} else {
										var url = document.location + '';
										if(url.indexOf('?') > -1) {
											if(url.indexOf('currentPage') > -1) {
												var reg = /currentPage=\d*/g;
												url = url.replace(reg, 'currentPage=');
											} else {
												url += "1&currentPage=";
											}
										} else {
											url += "?currentPage=";
										}
										url = url + "&showCount=" + value;
										document.location = url;
									}
								}

								function toTZ() {
									var toPaggeVlue = document.getElementById("toGoPage").value;
									if(toPaggeVlue == '') {
										document.getElementById("toGoPage").value = 1;
										return;
									}
									if(isNaN(Number(toPaggeVlue))) {
										document.getElementById("toGoPage").value = 1;
										return;
									}
									nextPage(toPaggeVlue);
								}
							</script>

							<div class="clearfix"></div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 全局js -->
		<script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
		<script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>

		<!-- 自定义js -->
		<script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>
		<script src="__PUBLIC__/admin/js/plugins/viewerjs/viewer-jquery.min.js"></script>
		<script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
		<script>
			// 缩略图
			$('.js-viewer-image').viewer({
				url: 'data-original',
			});
			//日志
		</script>
	</body>

</html>